(1) Field of the Invention
The present invention relates to a processor such as a DSP (Digital Signal Processor) and a CPU (Central Processing Unit), as well as to a compiler that generates instructions executed by such a processor. More particularly, the present invention relates to a processor and a compiler which are suitable for performing signal processing for sounds, images and others.
(2) Description of the Related Art
With the development in multimedia technologies, processors are increasingly required to be capable of high-speed media processing represented by sound and image signal processing. As existing processors responding to such requirement, there exist Pentium®/Pentium® III/Pentium 4® MMX/SSE/SSE2 and others produced by the Intel Corporation of the United States supporting SIMD (Single Instruction Multiple Data) instructions. Of these processors, MMX Pentium, for example, is capable of performing the same operations in one instruction on a maximum of eight integers stored in a 64-bit-long MMX register.
Such existing processors realize high-speed processing by utilizing software pipelining, as described in the following: Mitsuru Ikei, IA-64 Processor Basic Course (IA-64 Processor Kihon Koza), Tokyo: Ohmsha Ltd., 1999. FIG. 4.32 p. 129.
FIG. 56 is a diagram showing the operation of an existing processor using 4-stage software pipelining. In order to implement software pipelining, predicate flags used for predicates that indicate whether or not instructions should be executed are stored in a predicate register. In addition to this, the number of execution times until processing of the prolog phase in the software pipelining ends is stored in the loop counter, whereas the number of execution times until processing of the epilog phase in the software pipelining ends is stored in the epilog counter.
However, the above-described existing processor manages the loop counter, the epilog counter and the predicate register as individual hardware resources. Therefore, such processor is required to be equipped with many resources, which results in large-scale circuits.
Moreover, a large-scale circuit means that the amount of power consumed by the processor becomes large.